
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Univer ❤️ Astro</title>
  </head>
  <body>
    <div id="univer"></div>
  </body>
</html>

<style>
html, body, #univer {
  height: 100%;
  margin: 0;
  padding: 0;
}
</style>

<script>
import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core'
import sheetsCoreEnUS from '@univerjs/preset-sheets-core/locales/en-US'
import { createUniver, LocaleType, mergeLocales } from '@univerjs/presets'

import '@univerjs/preset-sheets-core/lib/index.css'

const { univerAPI } = createUniver({
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: mergeLocales(
      sheetsCoreEnUS,
    ),
  },
  presets: [
    UniverSheetsCorePreset({
      container: document.querySelector('#univer')! as HTMLElement,
    }),
  ],
})

univerAPI.createWorkbook({})
</script>
